<template>
    <h2>{{ title }}</h2>
    <ul>
        <li v-for="student in students" :key="student.id">
            {{ student.id }}.{{ student.name }}-{{ student.age }}-{{ student.gender }}
        </li>
    </ul>
</template>

<script>

export default {
    props: {
        students: {
            type: Array,
            default: [],
        },
        title: {
            type: String,
            default: '',
            require: false // 默认就是false
        }
    },
}
</script>

<style scoped></style>